import { request } from './request';

export async function getAllExperimentPlan() {
  return request('/api/experimentPlan', {
    method: 'GET',
  })
}

export async function appendExperimentPlan(data: any) {
  return request('/api/experimentPlan', {
    method: 'POST',
    data,
  })
}

export async function updateExperimentPlan(data: any) {
  return request(`/api/experimentPlan/${data?.ecId}/${data?.epBatch}`, {
    method: 'PUT',
    data,
  })
}

export async function destroyExperimentPlan(data: any) {
  return request(`/api/experimentPlan/${data?.ecId}/${data?.epBatch}`, {
    method: 'DELETE',
  })
}

export default {
  getAllExperimentPlan,
  appendExperimentPlan,
  updateExperimentPlan,
  destroyExperimentPlan,
};
